package revise;

public class Test {
    public static void test1(){
        MyLinkedList list = new MyLinkedList();
        list.addFirst("a");
        list.addFirst("b");
        list.addFirst("c");
        list.addFirst("d");
        System.out.println(list);
    }
    public static void test2(){
        MyLinkedList list = new MyLinkedList();
        list.addLast("a");
        list.addLast("b");
        list.addLast("c");
        list.addLast("d");
        System.out.println(list);
    }
    public static void test3(){
        MyLinkedList list = new MyLinkedList();
        list.addLast("a");
        list.addLast("b");
        list.addFirst("c");
        list.addFirst("d");
        list.add(0,"x");
        list.add(5,"y");
        list.add(3,"z");
        System.out.println(list);
    }
    public static void test4(){
        MyLinkedList list = new MyLinkedList();
        list.addLast("a");
        list.addLast("b");
        list.addLast("c");
        list.addLast("d");
        System.out.println(list.remove(0));
        System.out.println(list);
        System.out.println(list.remove(2));
        System.out.println(list);
    }
    public static void test5(){
        MyLinkedList list = new MyLinkedList();
        list.addLast("a");
        list.addLast("b");
        list.addLast("c");
        list.addLast("d");
        list.addLast("e");
        list.addLast("f");
        list.addLast("g");
        list.addLast("h");
        System.out.println(list.remove("c"));
        System.out.println(list);
    }
    public static void main(String[] args) {
        //test1();
        //test2();
        //test3();
        //test4();
        //test5();
    }
}
